<?
global $db,$value;

$e = $db->query1("select * from node where ".
	" folderid = ".$db->sqlint($params["folder"]).
	" and (id = ".$db->sqlstring($value).
	" or link = ".$db->sqlstring($value).")".
	"");

if (!$e["id"]) fusedie("404");
	
$params["id"] = $e["id"];

permission_require($e,4);

if ($e["folder"]) return array("folder",$params);

$se = $db->query1("select * from skin where id = ".$db->sqlint($e["skin_id"]));
$fname = $se["fname"];
if (strstr($fname,"/")) {
	list($dname,$fname) = explode("/",$fname,2);
	$GLOBALS["skinurl"] = "{$GLOBALS["topurl"]}/skins/$dname";
	$GLOBALS["skindir"] = "{$GLOBALS["topdir"]}/skins/$dname";
	}
skin_param("fname",$fname);

#if ($e["type"]) ..

$me = $db->query1("select * from modules where id = ".$db->sqlint($e["modules_id"]));

return array($me["name"],$params);
?>